<?php

    /**
 * ProcessSimpleType method
 * @param string $who name of the person we'll say hello to
 * @return string $helloText the hello  string
 */
    require_once ("lib/nusoap.php");
    require_once ("User.php");
    
    $ns = "http://localhost:8080/Webservice";
    $server = new soap_server();
    
    //Configure WSDL
    $server->configureWSDL("RegisterService");
    $server->wsdl->schemaTargetNamespace = $ns;
    
 
 //=======================================================================================//
 //=======================================================================================//
   $server->register(
           'getXmlString',
           array('xmlstring'=>'xsd:string'),
           array(),
           $ns,
           FALSE,
           'rpc',
           'encoded',
           'Get XML String from client'
           );
   $server->register(
           'createXmlString',
           array(),
           array('return'=>'xsd:string'),
           $ns,
           FALSE,
           'rpc',
           'encoded',
           'Create string XML'
           );
 //=======================================================================================//
   function createXmlString()
   {
       $user = new User;
       return $user->selectData();
   }
   function getXmlString($xmlstring)
   {
       $user = new User;
       $user->insertData($xmlstring);
   }
 //=======================================================================================//
    //Main function for DEMO
 //=======================================================================================//
   
 //=====================================================================================//
 //=====================================================================================//
    //out put return
    $HTTP_RAW_POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA'])?$GLOBALS['HTTP_RAW_POST_DATA']:'';
    $server->service($HTTP_RAW_POST_DATA);
    exit();
?>